package ar.pegasus.clasificador.web.error;

import org.jboss.seam.Component ;
import org.jboss.seam.InstantiationException ;

public class GestorErroresHelper {

	private static GestorErroresHelper instance = new GestorErroresHelper() ;

	public static GestorErroresHelper getInstance() { return instance ; }

	private GestorErroresHelper() {
	}

	public void gestionarError(Exception e, String mensaje, String fromURL) throws ErrorInesperadoException {
		GestorErroresBean gestorErrores ;
		try {
			gestorErrores = (GestorErroresBean) Component.getInstance("gestorErrores");
			gestorErrores.gestionarError(e, mensaje, fromURL) ;
		} catch (InstantiationException ee) {
			ee.printStackTrace() ;
			throw new RuntimeException(ee) ;
		}
	}

}
